/*
 * dynamic_array.h
 *
 *  Created on: 25.9.2011
 *      Author: duke
 */

#ifndef DYNAMIC_ARRAY_HPP_
#define DYNAMIC_ARRAY_HPP_

#include <vector>

using namespace std;

class dynamic_array {
public:
	dynamic_array();
	dynamic_array(int, int);
	vector<int> & operator[](int);
	const vector<int> & operator[](int) const;
	dynamic_array operator*(dynamic_array&);
	int getrows();
	int getcols();
	int getValue(int, int);
	void resize(int, int);
	dynamic_array powerOfTwo();
	void print();

private:
	int rows, cols;
	std::vector<std::vector<int> > data_;
};

#endif /* DYNAMIC_ARRAY_HPP_ */
